/**
 ** This file is part of FK Klistret Extensions. FK Klistret Extensions 
 ** is free software: you can redistribute it and/or modify it under the 
 ** terms of the GNU General Public License as published by the Free 
 ** Software Foundation, either version 3 of the License, or (at your option) 
 ** any later version.

 ** FK Klistret Extensions is distributed in the hope that it will be 
 ** useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 ** General Public License for more details. You should have received a
 ** copy of the GNU General Public License along with FK Klistret Extensions. 
 ** If not, see <http://www.gnu.org/licenses/>
 */
package se.fk.klistret.console.ui;

/**
 * 2011-07-11, The comments below are from 2005 and the code is has since
 * upgraded to the Ant 1.8 platform. The patterns and design of this project
 * should not be reused since they are not considered of any quality. The code
 * was written quickly without long term concerns.
 * <p>
 * 
 * 2005, TextMenuComponent provides an abstract framework of the relationship between
 * TextMenuItem objects. Every menu item has a parent menu unless it is the root
 * or main menu. The relation is simply an object reference to another
 * TextMenuComntainer (implemented by TextMenu).
 * 
 * @author Matthew Young
 */
public abstract class TextMenuComponent {
	/**
	 * TextMenuItem name (no application to date)
	 */
	private String name;
	/**
	 * TextMenu parent
	 */
	private TextMenuContainer parent;

	/**
	 * Returns the TextMenuItem name
	 * 
	 * @return <code>String</code>
	 * 
	 */
	public String getName() {
		return name;
	}

	/**
	 * Sets the TextMenuItem name
	 * 
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * Returns the TextMenu parent. Usefull for displaying parent menus thereby
	 * changing the menu focus (dvs moving up the menu tree - typing exit or
	 * back).
	 * 
	 */
	public TextMenuContainer getParent() {
		return parent;
	}

	/**
	 * Sets the TextMenu parent.
	 * 
	 */
	public void setParent(TextMenuContainer parent) {
		this.parent = parent;
	}

}
